import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'

//全局样式
import './style/common.scss'

//element-ui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)

Vue.config.productionTip = false

//读取配置文件
axios.get('/config.js')
.then(res=>{
  const configFatory = eval(res.data)
  const config = configFatory(process.env.NODE_ENV)
  window.$GlobalConfig = config
  new Vue({
    router,
    store,
    render: h => h(App)
  }).$mount('#app')
})


